/**
 * 
 */
package com.zhanggz.mypattern.adapter;

/**
 * 二相转三相的插座适配器,通过对象组合的方式实现
 * 
 * @author alex
 * @Date Jun 22, 2015
 */
public class TwoPlugAdapter implements ThreePlugIf {

	private GBTwoPlug plug;

	/**
	 * 
	 */
	public TwoPlugAdapter(GBTwoPlug plug) {
		this.plug = plug;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.zhanggz.mypattern.adapter.ThreePlugIf#powerWithThree()
	 */
	public void powerWithThree() {
		System.out.println("通过转化");
		plug.powerWithTwo();
	}

}
